window.URL = {
	path: 'http://www.qironghome.com/api/index.php',
	path2 : 'http://www.qironghome.com/index.php'
};

function set_font() {
	// 计算、转换布局单位
	var html = document.getElementsByTagName('html')[0];
	var designFontSize = 100,
		designWidth = 750;

	function setFontSize() {
		var winWidth = document.documentElement.getBoundingClientRect().width;
		var fontSize = winWidth / designWidth * designFontSize;

		html.style.fontSize = fontSize + 'px';
	}
	setFontSize();
	window.addEventListener('resize', function() {
		setFontSize();
	});

	return this;
}
set_font();

function getUrlParam(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);

    if (r != null) return decodeURIComponent(r[2]);
    return null
}